/*
  Created by 1271107612@qq.com.
  User: DELL
  Date: 2022/4/18
  Time: 13:21
  DESCRIPTION: 
*/
package com.zzy.face.service.impl;

import com.zzy.face.dao.CollegeDao;
import com.zzy.face.model.College;
import com.zzy.face.service.CollegeService;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CollegeServiceImpl implements CollegeService {
    final CollegeDao collegeDao;

    public CollegeServiceImpl(CollegeDao collegeDao) {
        this.collegeDao = collegeDao;
    }

    @Override
    public void save(College college) {
        collegeDao.save(college);
    }

    @Override
    public List<College> findAll() {
        return collegeDao.findAll();
    }

    @Override
    public College findById(Long id) {
        return collegeDao.getOne(id);
    }

    @Override
    public College findByTitle(String title) {
        return collegeDao.findCollegeByTitle(title);
    }
}
